<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 伪元素清除-----后边课程讲 */
        .clearfix ::after {
            content: "";
            display: block;
            height: 0;
            clear: both;
            visibility: hidden;
        }

        .clearfix {
            *zoom: 1;
        }

        .damao {
            width: 90px;
            height: 90px;
            background-color: red;
            float: left;
        }

        .ermao {
            width: 90px;
            height: 90px;
            background-color: gray;
            float: left;
        }

        .sanmao {
            width: 100px;
            height: 90px;
            background-color: greenyellow;
            float: left;
        }

        .zhengchang {
            height: 150px;
            background-color: maroon;
        }
    </style>
</head>

<body>
    <div class="nav clearfix">
        <div class="damao">浮动1</div>
        <div class="ermao">浮动2</div>
        <div class="sanmao">浮动3</div>
    </div>
    <div class="zhengchang"></div>
</body>

</html>